package cn.pink.core.entity;

/**
 * @Author: pink
 * @Date: 2022/7/21 17:58
 */
public abstract class AbstractEntity {
    /** 每个entity对应的角色id */
    protected transient String humanId;

    /** 每个entity对应的key前缀 */
    protected transient String keyPrefix;

    public String getHumanId() {
        return humanId;
    }

    protected void init(String humanId) {
        this.humanId = humanId;
        makeKey();
    }

    /**
     * 拼装key
     */
    public abstract void makeKey();

    public String getKeyPrefix() {
        return keyPrefix;
    }
}
